<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let items = ["zero", "one", "two"];
        let it=items[Symbol.iterator]();//迭代器

        var is=it.next();  
        // console.log(is.done);
        // is=it.next();
        // console.log(is.done);
        // is=it.next();
        // console.log(is.done);
        // is=it.next();
        while(!is.done){
            console.log(is.value);
            is=it.next();
        }

        
        var arr = ['a', 'b', 'c'];
        var iterator = arr[Symbol.iterator]();
        for (let axs of iterator) {
            console.log(axs);
        }


    </script>



</body>
</html>